package com.hebeu.xwl.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result<T> {
    private int code;
    private T data;
    private String msg;

    public Result(int i, String success) {
        this.code = i;
        this.msg = success;
    }

    public void success(){
        this.code = 0;
        this.msg = "success";
    }
    public void success(String msg){
        this.code = 0;
        this.msg = msg;
    }
    public void error(String msg){
        this.code = 1;
        this.msg = msg;
    }
}
